package org.example.service.impl;

import org.example.mapper.UserMapper;
import org.example.pojo.entity.User;
import org.example.service.UserService;
import org.example.utils.R;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.*;

/**
 * @description
 * @DateTime: 2024/1/25 9:26
 */
@Service
public class UserServiceImpl implements UserService {
    @Resource
    private UserMapper userMapper;

    @Override
    public R<Void> save(User user) {
        if (userMapper.insert(user) == 0){
            return R.ok();
        }
        return R.fail();
    }

    @Override
    public R<Void> saveBatch(List<User> userList) {
        return R.ok();
    }

    @Override
    public R<Void> saveBatch(List<User> userList, int size) {
        return R.ok();
    }
}
